<?php

class ToolbaseUserID {

        public static function getFromName( $request ) {
                
                $db = ToolbaseDatabaseManager::getInstance()->getLangServer()->getObject();
                
                return $db->select()
                        ->from( array( 'user', 'u' ) )
                        ->where( 'user_name = ?', Toolbase::cleanUsername( $request->getParameter( 'name' ) ) )
                        ->query()
                        ->fetch();
                
        }
        
}
